Release 10.1A: OpenEdge Development:
Progress 4GL Reference
SET-PARAMETER( ) method
Lets you set parameters of one of the following:
- A procedure or user-defined function you want to invoke dynamically.
- An attribute you want to get or set dynamically.
Return type: LOGICAL Applies to: CALL object handle- A method you want to invoke dynamically.
parameter-numberAn INTEGER expression indicating the order of the parameter. Use 1 for the first parameter, 2 for the second parameter, and so on.
data-typeA CHARACTER expression indicating the data type of the parameter and evaluating to one of the following:
- “CHARACTER”
- “DATASET-HANDLE”
- “DATE”
- “DATETIME”
- “DATETIME-TZ”
- “DECIMAL”
- “HANDLE”
- “INTEGER”
- “LOGICAL”
- “LONGCHAR”
- “MEMPTR”
- “RAW”
- “ROWID”
- “TABLE-HANDLE”
TABLE-HANDLE can be a handle to a static or dynamic temp-table. Likewise, DATASET-HANDLE can be a handle to a static or dynamic ProDataSet object.
Note: To manage BUFFER parameters, use HANDLE parameters.For each parameter, the data type specified by the caller and the callee must be compatible.
iomodeA CHARACTER expression indicating the mode of the parameter and evaluating to one of the following:
- “INPUT”
- “OUTPUT”
- “INPUT-OUTPUT”
- “OUTPUT-APPEND”
For each parameter, the mode specified by the caller and the callee must match.
For parameters of attributes, specify “INPUT.”
For TABLE-HANDLE output parameters whose output is to be appended to the table, and in no other case, specify “OUTPUT-APPEND.”
If
data-typeis “DATASET-HANDLE”, you can append "-by-reference" to anyiomodelisted above.parameter-valueAn expression whose type is compatible with
data-type.The
parameter-valueargument may represent a determinate or indeterminate array. However, you cannot pass an array by value. You can pass an array only as a variable defined using the DEFINE VARIABLE statement with the EXTENT option. If you include the EXTENT keyword in thedata-typeargument, Progress ignores it. If you include the array element values in theparameter-valueargument, Progress generates a compile error.If
iomodeis “INPUT” or “INPUT-OUTPUT,” if the data type ofparameter-valuedoes not agree with the data type passed,parameter-valuewill automatically be converted to the data type passed during SET-PARAMETER( ) processing.If iomode is “OUTPUT” or “INPUT-OUTPUT,” each of the following must be true:
parameter-valuemust represent a program variable or a NO-UNDO TEMP-TABLE field (perhaps with an array reference).parameter-valuemust still be in scope and must still be valid when the dynamic invoke is executed.If the output value from the called procedure does not have a data type that matches the data type passed, the output value will be converted to the data type passed.
If iomode is “OUTPUT,”
parameter-valueis ignored if the ASYNCHRONOUS attribute is TRUE.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |